/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { RChatResult } from '../models/RChatResult';
import type { RString } from '../models/RString';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class AiService {

    /**
     * @param model 
     * @param confThreshold 
     * @param iouThreshold 
     * @param formData 
     * @returns RString OK
     * @throws ApiError
     */
    public static getAiResult(
model: string,
confThreshold: number,
iouThreshold: number,
formData?: {
file: Blob;
},
): CancelablePromise<RString> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/ai',
            query: {
                'model': model,
                'confThreshold': confThreshold,
                'iouThreshold': iouThreshold,
            },
            formData: formData,
            mediaType: 'multipart/form-data',
        });
    }

    /**
     * @param id 
     * @param uid 
     * @param formData 
     * @returns RChatResult OK
     * @throws ApiError
     */
    public static getChatResult(
id: number,
uid: number,
formData?: {
file: Blob;
},
): CancelablePromise<RChatResult> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/ai/chat',
            query: {
                'id': id,
                'uid': uid,
            },
            formData: formData,
            mediaType: 'multipart/form-data',
        });
    }

}
